package com.example.demo.service;

import com.example.demo.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Service
public class PUserService {

    @Autowired
    private UserService userService;
    @Autowired
    private UserMapper userMapper;


    @Transactional(propagation = Propagation.REQUIRED)
    public void updateDb(){
        userService.update();
        try {
            userService.update_new();
        }catch (Exception e){

        }
        userMapper.update3(87);
    }
}
